home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk71 / strip / strip.doc < prev    next >
Text File  |  1995-03-19  |  5KB  |  110 lines

  1.  
  2.  
  3.                            ***** STRIP *****
  4.  
  5.     You do not need to read this doc to use STRIP, or at least
  6. I wouldn't think so.  To use it, just type STRIP at the Command Line
  7. by itself and you will be given the format.  R removes carriage returns
  8. from the data file, A adds carriage returns to the data file before every
  9. linefeed, and S strips the leading spaces from the left most part of the
  10. data file (in effect removing the left margin). 
  11.  
  12.         Stripping the spaces option removes all spaces after a line feed
  13. until it hits a non-space character.  If you really want to mess up 
  14. someones mind, give them your C source with the leading spaces stripped
  15. off....they'll never understand it!  
  16.  
  17.        ******* The details for those that are interested *******
  18.  
  19.     Another FILTER program?  No not really <grin!>.  Many of our
  20. authors of P.D. software use word processors to write the documentation
  21. for their programs, probably because programmers are  such terrible 
  22. spellers and most of these word processors have spell checkers.  Anyway,
  23. when they are done they tell the system to print an image of this
  24. document to disk.  That's OK except it prints it with the left margin.
  25.  
  26.         This left margin causes (in some cases) the text to print to 
  27. the screen so that there is 'wrap' to the next line.  So in effect
  28. what you get is three or four words that always drop to the next line
  29. making reading difficult.  At least its difficult for me, maybe I'm
  30. weird.
  31.  
  32.     So as long as I was writing a program to strip the leading
  33. spaces, I threw in the ability to remove or add carriage returns.
  34.  
  35.     For those that do not know, the AMIGA uses only linefeeds
  36. to start the next line, where the IBM (MS-DOS) environment uses 
  37. Carriage Returns and Linefeeds.  Reading an IBM file is not really
  38. a problem for us AMIGANS because most of our tools just ignore the
  39. carriage return, and if they don't we just just get double line 
  40. spacing.  But a file with no carriage returns causing lots of 
  41. problems for those IBMers.  It's nice to be on the right side of
  42. the fence isn't it.
  43.  
  44.     To use STRIP, enter:
  45.  
  46.                 STRIP <inputfile>  <outputfile>  <option>
  47.  
  48.     where 'inputfile' is the file to read, 'outputfile' is the
  49. file that will be created.  The option is either R, A, or S.  R is
  50. the option to remove all carriage returns from the data file, A is
  51. the option to add a carriage return before every linefeed, and S is
  52. the option to removes each space encountered after a linefeed until
  53. a non-space character is encountered.  S also strips any carriage
  54. returns it encounters.
  55.  
  56.     When using the S option, realize that every line will be 
  57. left justified (including lines that were previously centered or
  58. indented).  The S option WILL NOT strip TABs.  I spent quite some
  59. time trying to figure out why it wasn't stripping some of the 
  60. spaces, only to find out they were TABs...(maybe I should add
  61. that option too, hmmmmmm?). 
  62.  
  63.     STRIP is written in Lattice C ver 4.0. As for benchmarks,
  64. I processed 1200 lines, and the results were as follows:
  65.  
  66.               RAM: to RAM:   3   seconds
  67.               RAM: to DF0:   8   seconds
  68.               DF0: to DF1:  13   seconds
  69.               DF0: to DF0:  82   seconds (Yow!)
  70.               DH0: to DH0:   6   seconds
  71.  
  72.     As you can see, I don't recommend that you read and write
  73. to the same floppie.  Besides taking a long time, it's noisy as hell!
  74. Well that's it folks.....hope it does ya some good!
  75.  
  76.     Oh yeah!  This software is total Public Domain. No monies
  77. are to be charged for this software, except the standard media
  78. transfer charges (you know, disks, phoneline charges, standard
  79. hourly BBS rates, etc.).  It belongs to me, I have the source
  80. code to prove it, and I want anyone that can use it to have it
  81. free of charge.
  82.  
  83.         Don't send me any monies......you'd be nuts if you did! 
  84. If you have an over powering urge to spend money, take you wife
  85. (or girlfriend) out to dinner instead (or go buy Dungeon Master.
  86. It's a great game!).  Considering this program is worth about 
  87. two bucks if I were buying it, you better make it the Golden 
  88. Arches!
  89.  
  90.     I don't intend to do any updates (come on, who's kidding
  91. who here? This is no major impact on the Amiga world!) but I am
  92. interested in any problems you find or suggestions for additions.
  93. I may want to add your suggestions for my own use.  If I do, I'd
  94. release the new version.
  95.  
  96.     One idea I'm kicking around is adding the ability to set
  97. the line size i.e: Read in the entire file, stripping the carriage
  98. returns and linefeeds out, then re-write the file on a second pass
  99. to a pre-determined line length.  I don't know what I'd use it for,
  100. I just want to see if I can do it in a tight enough loop....anyway
  101. let me know what you think, good or bad.
  102.  
  103.  
  104.                     Brett Lathrope,
  105.                     Buena Park, CA.
  106.  
  107.                                         GEnie: B.Lathrope
  108.  
  109.  
  110.